#!/usr/bin/env python
# -*- coding:utf-8 -*-

from .apiVersionResource import apiversion_blueprint
from .administratorResource import administrator_blueprint
from .articleResource import article_blueprint
from .userResource import user_blueprint
from .paperResource import paper_blueprint
from .wordResource import word_blueprint
from .wordbookResource import wordbook_blueprint
from .userWordTimesResource import userwordtimes_blueprint
from .dictionaryResource import dictionary_blueprint
from .wordWordbookAppendResource import wordwordbookappend_blueprint
from .wordDictionaryResource import worddictionary_blueprint
from .planResource import plan_blueprint
from .administratorTokenResource import administratortoken_blueprint


def init_router(app):
    from api_1_0.apiVersionResource import apiversion_blueprint
    app.register_blueprint(apiversion_blueprint, url_prefix="/api_1_0")

    # administrator blueprint register
    from api_1_0.administratorResource import administrator_blueprint
    app.register_blueprint(administrator_blueprint, url_prefix="/api_1_0/administrator")
    
    # article blueprint register
    from api_1_0.articleResource import article_blueprint
    app.register_blueprint(article_blueprint, url_prefix="/api_1_0/article")
    
    # user blueprint register
    from api_1_0.userResource import user_blueprint
    app.register_blueprint(user_blueprint, url_prefix="/api_1_0/user")
    
    # paper blueprint register
    from api_1_0.paperResource import paper_blueprint
    app.register_blueprint(paper_blueprint, url_prefix="/api_1_0/paper")
    
    # word blueprint register
    from api_1_0.wordResource import word_blueprint
    app.register_blueprint(word_blueprint, url_prefix="/api_1_0/word")
    
    # wordbook blueprint register
    from api_1_0.wordbookResource import wordbook_blueprint
    app.register_blueprint(wordbook_blueprint, url_prefix="/api_1_0/wordbook")
    
    # userWordTimes blueprint register
    from api_1_0.userWordTimesResource import userwordtimes_blueprint
    app.register_blueprint(userwordtimes_blueprint, url_prefix="/api_1_0/userwordtimes")
    
    # dictionary blueprint register
    from api_1_0.dictionaryResource import dictionary_blueprint
    app.register_blueprint(dictionary_blueprint, url_prefix="/api_1_0/dictionary")
    
    # wordWordbookAppend blueprint register
    from api_1_0.wordWordbookAppendResource import wordwordbookappend_blueprint
    app.register_blueprint(wordwordbookappend_blueprint, url_prefix="/api_1_0")
    
    # wordDictionary blueprint register
    from api_1_0.wordDictionaryResource import worddictionary_blueprint
    app.register_blueprint(worddictionary_blueprint, url_prefix="/api_1_0")
    
    # plan blueprint register
    from api_1_0.planResource import plan_blueprint
    app.register_blueprint(plan_blueprint, url_prefix="/api_1_0/plan")
    
    # administratorToken blueprint register
    from api_1_0.administratorTokenResource import administratortoken_blueprint
    app.register_blueprint(administratortoken_blueprint, url_prefix="/api_1_0")

